#ifndef GLOBALDATA_H
#define GLOBALDATA_H

#include <QMap>

class GlobalData
{
public:

    static GlobalData * instance();

    static QString boolTrue;
    static QString boolFalse;

    void add(QString k, QString v){
        data.insert(k, v);
    }

    void set(QString k, QString v){
        data[k] = v;
    }

    QString get(QString k){
        if(!data.contains(k))return boolFalse;
        return data[k];
    }

    bool contains(QString k){
        return data.contains(k);
    }

private:
    QMap<QString, QString> data;
    GlobalData();
    static GlobalData *m_globalData;
};

#endif // GLOBALDATA_H
